package com.game.Maze.Game.Objects;

import java.util.UUID;

import com.game.Maze.Utils.ObjectsIdFactory;

/**
 * Базовый объект любого игрового объекта 
 *
 */
public class BaseGameObject implements IBaseGameObject
{
  private String m_Description;
  private UUID m_Id;
  
  public BaseGameObject(String description, Class<?> objectClass)
  {
    m_Description = new String(description);
    m_Id = ObjectsIdFactory.getInstance().createId(objectClass);
  }
  
  public String getDescription()
  {
    return new String(m_Description);
  }
  
  public UUID getId()
  {
    return m_Id;
  }

  public boolean sameAs(IBaseGameObject compareItem)
  {
    return getId().equals(compareItem.getId());
  }
}
